package Farsail::Mock::PBS;

use strict; 
use warnings;

use Carp;

use Farsail::PBS;
use Farsail::PBS::Job;
use Test::MockObject;

my $queue_sub = \&Farsail::PBS::submit;
my $job_sub = \&Farsail::PBS::Job::submit;
    
Test::MockObject->fake_module (
    'Farsail::PBS',
    submit => sub {
        my $self = shift;
        $self->$queue_sub(1);
    });

Test::MockObject->fake_module (
    'Farsail::PBS::Job',
    submit => sub {
        my $self = shift;
        $self->$job_sub(1);
    });

1;
